package com.cxr.flutter.flutterweatherchina.factory

import android.content.Context
import android.util.Log
import com.cxr.flutter.flutterweatherchina.view.MyView
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.StandardMessageCodec
import io.flutter.plugin.platform.PlatformView
import io.flutter.plugin.platform.PlatformViewFactory

class SharePlatformViewFactory(private val messenger: BinaryMessenger)
    : PlatformViewFactory(StandardMessageCodec.INSTANCE) {

    override fun create(context: Context, id: Int, args: Any?): PlatformView {
        val params = args?.let { args as Map<String, Any> }
        Log.d("MYTAG:",params.toString())

        return MyView(context, messenger, id, params)

    }
}
